package com.heima.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Sku {
    @TableId(value = "id",type = IdType.ID_WORKER)
    @JsonSerialize(using = ToStringSerializer.class)//把当前字段转换为字符串进行响应
    private Long skuId;
    private String skuName;
    private String skuImage;
    private Integer price;
    private Integer classId;
    private Integer isDiscount;
    private String unit;
    private String brandName;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    private SkuClass skuClass;


}
